﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="BasicModelController.cs" company="">
//   
// </copyright>
// <summary>
//   The basic model controller.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace BuildJavascriptModelDemo.Controllers
{
    using System.Web.Mvc;

    using BuildJavasciptDataModel_Test.DataModels;

    /// <summary>
    /// The basic model controller.
    /// </summary>
    public class BasicModelController : Controller
    {
        #region Public Methods

        /// <summary>
        /// The index.
        /// </summary>
        /// <returns>
        /// </returns>
        public ActionResult Index()
        {

            return this.View(new BasicModel());
        }

        [HttpPost]
        public JsonResult GetModel()
        {
            var b = new BasicModel
            {
                RadioButtons = 2,
                CheckBoxTest = false,
                IntegerTest = 88,
                SelectTest = 1,
                StringTest = "Hi There"
            };

            return Json(b);
        }
        #endregion
    }
} ;